<template>
  <div>
    <table cellspacing="0" cellpadding="0">
      <tr v-if="companyData.electricFlag||companyData2.steamFlag">
        <th colspan="2">对比分析<br /> {{companyData.monthRange}} </th>
        <th v-if="companyData.electricList" v-for="(item,index) in companyData.electricList" :key="index">{{item.team}} <br /> {{item.time}}</th>
        <th v-if="companyData.electricList==null" v-for="(item,index) in companyData2.steamList" :key="index">{{item.team}} <br /> {{item.time}}</th>
      </tr>
      <tr v-if="companyData.electricFlag">
        <td rowspan="2">用电情况</td>
        <td>波动最大{{level}}</td>
        <td v-for="(item,index) in companyData.electricList" :key="index">{{item.workShopName}}</td>

      </tr>
      <tr v-if="companyData.electricFlag">
        <td>用电量</td>
        <td v-for="(item,index) in companyData.electricList" :key="index">{{item.electricQuantity}}kWh</td>

      </tr>
      <tr v-if="companyData.electricFlag">
        <td :colspan="2+companyData.electricList.length" class="Stable">用电波动情况分析&nbsp;&nbsp;{{companyData.electricStable}}</td>

      </tr>
      <tr v-if="companyData2.steamFlag">
        <td rowspan="2">用汽情况</td>
        <td>波动最大{{level}}</td>
        <td v-for="(item,index) in companyData2.steamList" :key="index">{{item.workShopName}}</td>

      </tr>
      <tr v-if="companyData2.steamFlag">
        <td>用汽量</td>
        <td v-for="(item,index) in companyData2.steamList" :key="index">{{item.steamQuantity}}t</td>

      </tr>
      <tr v-if="companyData2.steamFlag">
        <td :colspan="2+companyData2.steamList.length" class="Stable">用汽波动情况分析&nbsp;&nbsp;{{companyData2.steamStable}}</td>
      </tr>
    </table>
    <!--<div class="nodata" v-if="!companyData.electricFlag&&!companyData2.steamFlag">
  				<img src="../../../../../static/img/NoData.png"/>
  			</div> -->
  </div>
</template>

<script>
export default {
  props: {
    companyData: {
      type: Object
    },
    companyData2: {
      type: Object
    },
    level: {
      type: String
    }
  },
  data() {
    return {

    };
  },
  mounted() {
  },
  computed: {
    inteam() {
      return this.companyData
    }
  },
  watch: {

  },
  methods: {

  },
  created() {

  }
}
</script>
<style lang="scss" scoped>
table {
  min-height: 100px;
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e9e9e9;
  text-align: center;
  color: #333333;

  th {
    border: 1px solid #e9e9e9;
    background: rgba(238, 244, 252, 1);
    line-height: 19px;
    padding: 7px 0px;
    text-align: center;
  }
  td {
    border: 1px solid #e9e9e9;
    padding: 17px 0px;
    text-align: center;
  }
  .Stable {
    background: rgba(249, 249, 249, 1);
  }
}
.nodata {
  text-align: center;
  img {
    height: 200px;
  }
}
</style>
